package com.aizuda.boot.modules.business.contract_operation_log.domain.vo;

import com.aizuda.boot.modules.file.domain.vo.FileVO;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

/**
 * 合同操作日志响应DTO
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "合同操作日志响应DTO")
public class ContractOperationLogRespDTO {

    @Schema(description = "日志ID")
    private Long id;

    @Schema(description = "合同ID")
    private Long contractId;

    @Schema(description = "流程类型编码")
    private String flowTypeCode;

    @Schema(description = "流程类型描述")
    private String flowTypeDesc;

    @Schema(description = "操作类型编码")
    private String actionTypeCode;

    @Schema(description = "操作类型描述")
    private String actionTypeDesc;

    @Schema(description = "数据源类型编码")
    private String sourceTypeCode;

    @Schema(description = "数据源类型描述")
    private String sourceTypeDesc;

    @Schema(description = "操作人信息")
    private OperatorInfo operator;

    @Schema(description = "操作时间")
    @JsonFormat(pattern = "MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date actionTime;

    @Schema(description = "用时")
    private String duration;

    @Schema(description = "主合同文件信息")
    private FileVO mainContractFile;

    @Schema(description = "协商者列表")
    private List<NegotiatorInfo> negotiators;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "版本信息")
    private String version;

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Schema(description = "操作人信息")
    public static class OperatorInfo {
        @Schema(description = "操作人ID")
        private Long id;

        @Schema(description = "操作人姓名")
        private String name;

        @Schema(description = "操作人头像")
        private String avatar;
    }

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Schema(description = "协商者信息")
    public static class NegotiatorInfo {
        @Schema(description = "协商者ID")
        private Long id;

        @Schema(description = "协商者姓名")
        private String name;

        @Schema(description = "协商者头像")
        private String avatar;
    }
} 